<template>
    <fieldset>
        <legend>父组件</legend>
        <h1>{{msg}}</h1>
        <Child :gift="gift" @rec="handle"></Child>
        <child2></child2>
    </fieldset>
</template>

<script>
import Child from "../Child"
import child2 from "../child2"
    export default {
        data() {
            return {
                msg:"一个父组件",
                gift:"你不知道的js"
            }
        },
        methods:{
            handle(input) {
                console.log(input);
            }
        },
            components: {
                Child,
                child2
            }
    }
</script>
